
<%@page contentType="text/html" pageEncoding="UTF-8" import ="com.model.User"%>

<div id="container">


    <jsp:include page = "header.jsp" />

    <div id ="content">

        <h1>Guess Form </h1>

        <font color="red">

            <% String userName = (String) request.getAttribute("userName");


            %>

            

            <%

        if (request.getAttribute("errorMsg") != null) {
            %>
            <p><%=request.getAttribute("errorMsg")%></p>


            <% }%>

        </font>

        <form method="POST" action="GuessController">

            <table align="center" class="table_format" cellpadding="15" cellspacing="15" >
                <tr>
                    <th><label for="guessCategory">Select A Guess Category</label></th>
                    <td>
                        <select name="guessCategory" value="">
                            <optgroup label="Categories"/>
                            <option></option>
                            <option value="Business">Business</option>
                            <option value="Entertainment">Entertainment</option>
                            <option value="Politics">Politics</option>
                            <option value="Sports">Sports</option>
                            <option value="Technology">Technology</option>

                        </select>


                    </td>
                </tr>

                <tr>
                    <th><label for="guessContent">Enter your Guess</label></th>
                    <td><textarea name="guessContent" rows="4" cols="20"></textarea></td>
                </tr>

                <!--  <tr>
                    <th><label for="guessCreatedBy">Enter your Nick name</label></th>
                    <td><input name="guessCreatedBy" type ="text"></td>
                </tr>-->

                <tr>
                    <th><label for="guessExpiresOn">Set a Guess Expiry Year</label></th>
                    <td> <input name="guessExpiresOn" type ="text"><input type="hidden" name="userName" value="<%= userName%>"  ></td>
                </tr>


            </table><br>

            <input class="guess_button" type="submit" value="">

        </form>


        <font color="red" >




            <% if (request.getAttribute("successMsg") != null) {
            %>

            <h2 align="center"> <%= request.getAttribute("successMsg")%></h2>

            <a href="GuessController" ><img src="viewguess.JPG"  width:199px height:41px ></a>


            <%
        }
            %>

     <a href="loginSuccess.jsp">MY HOME PAGE</a>

        </font>




    </div>

    <jsp:include page= "footer.jsp" />

</div>
